﻿<%@ Page CodeBehind="ManagerUser.aspx.cs" Title="" Language="C#" MasterPageFile="~/UI/HRManagerUI/HrManager.Master"
    AutoEventWireup="true" Inherits="HRM.UI.HRManagerUI.Configuration.ManagerUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentBody" runat="server">
    <link href="../../../Styles/Configuration/ManageUserCss.css" rel="stylesheet" type="text/css" />

    <div align="center">
        <asp:Label runat="server" ID="msgLbl"></asp:Label></div>
    <fieldset runat="server" id="createUser">
        <legend>Create a New User</legend>
        <table class="createUserTB">
            <tr>
                <td class="Label">
                    Employee Code:
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmployeeCode" class="textboxinput" />
                </td>
            </tr>
            <tr>
                <td class="Label">
                    User Name:
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtUserName" class="textboxinput"  />
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Password:
                </td>
                <td class="Field">
                    <input type="password" runat="server" id="txtPassword"  class="textboxinput" />
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Confirm Password
                </td>
                <td class="Field">
                    <input type="password" runat="server" id="txtConfirmPassword"  class="textboxinput" />
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Select User Type:
                </td>
                <td class="Field">
                    <select runat="server" id="selectRole" class="dropdownCss">
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="button" runat="server" id="btnSave" value="Create New User" onserverclick="CreateUser" class="btnCss"/>
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset runat="server" id="changePass">
        <legend>Change Password(This module can changed password only Loged user)</legend>
        <table class="changePassTB">
            <tr>
                    <td colspan="2" class="titlebar">
                        Change Account Info
                        <hr />
                    </td>
                </tr>
                
                <tr>
                    <td class="Labell">
                        New Username :
                    </td>
                    <td class="Fieldd">
                        <input type="text" id="txtUserNamechange" runat="server" class="textboxinput" />
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="txtUserNamechange" Text="*New Username required" CssClass="req" />

                    </td>
                </tr>
                <tr>
                    <td class="Labell">
                        Current Password :
                    </td>
                    <td class="Fieldd">
                        <input type="password" id="PsCurrent" runat="server" class="textboxinput" />
                         <asp:RequiredFieldValidator ID="RequiredFieldValidatorCP" runat="server" ControlToValidate="PsCurrent" Text="*Current Password required" CssClass="req" />
                    </td>
                </tr>
                <tr>
                    <td class="Labell">
                        New Password :
                    </td>
                    <td class="Fieldd">
                        <asp:TextBox runat="server" ID="PsNew" TextMode="Password" CssClass="textboxinput"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="req6" runat="server" ControlToValidate="PsNew" Text="* New password required" CssClass="req" />
                    </td>
                </tr>
                <tr>
                    <td class="Labell">
                        Confirm Password :
                    </td>
                    <td class="Fieldd">
                        <asp:TextBox runat="server" ID="PsConfirm" TextMode="Password" CssClass="textboxinput"></asp:TextBox>
                        <asp:CompareValidator runat="server" ID="Comp1" ControlToValidate="PsNew" ControlToCompare="PsConfirm"
                            Text="Password mismatch" CssClass="pm" />
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <input type="submit" runat="server" id="btnChangeAccount" value="Change Account"
                            class="btnCss" onserverclick="ChangeAccount" />
                    </td>
                </tr>
        </table>
    </fieldset>
    <fieldset runat="server" id="reset">
        <legend>Reset Account</legend>
        <table  class="ResetAccTB">
            <tr>
                <td class="Label">
                    Employee Code:
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmpCodeReset"  class="textboxinput"/>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="button" runat="server" id="Button2" value="Reset Account" onserverclick="ResetAccount" class="btnCss"/>
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset runat="server" id="delete">
        <legend>Delete User Account</legend>
        <table  class="DeleteUserTB">
            <tr>
                <td class="Label">
                    Employee Code:
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmpCodeDelete"  class="textboxinput"/>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="button" runat="server" id="Button3" value="Delete User" onserverclick="DeleteUser" class="btnCss"/>
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset runat="server" id="edit">
        <legend>Edit User Account</legend>
        <table  class="EditUserTB">
            <tr>
                <td class="Label">
                    Employee Code:
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmpCodeEdit"  class="textboxinput"/>
                    <input type="submit" runat="server" id="find" value="Find" onserverclick="FindUser" /><br />
                    <asp:label runat="server" id="roletxtLbl" Font-Bold="True" Font-Italic="True" 
                        ForeColor="#666699">Preset User Role:</asp:label>
                    <asp:label runat="server" id="previousUserRole"></asp:label>
                </td>
            </tr>
            <tr>
                <td class="Label">
                    Select User New Role:
                </td>
                <td class="Field">
                    <select runat="server" id="ddlSelectForEdit" class="dropdownCss"/>
                    
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="button" runat="server" id="Button4" value="Update" onserverclick="UpdateUser" class="btnCss"/>
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset runat="server" id="search">
        <legend>Searching User Account</legend>
        <table class="searchUserTB">
            <tr>
                <td class="Label">
                    Employee Code:
                </td>
                <td class="Field">
                    <input type="text" runat="server" id="txtEmpCodeSearch"  class="textboxinput"/>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <input type="button" runat="server" id="Button5" value="Search Account" onserverclick="SearchAccount" class="btnCss"/>
                   
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset>
        <legend></legend>
        <table width="30%" style="margin-left: 35%;text-align: center">
            <tr>
                <td>
                     <asp:gridview runat="server" id="serachAccountGdv" AutoGenerateColumns="False" 
                         BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                         CellPadding="3">
                         <Columns>
                             <asp:BoundField DataField="UserName" HeaderText="User Name" />
                             <asp:BoundField DataField="Password" HeaderText="Password" />
                         </Columns>
                         <FooterStyle BackColor="White" ForeColor="#000066" />
                         <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                         <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                         <RowStyle ForeColor="#000066" />
                         <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                         <SortedAscendingCellStyle BackColor="#F1F1F1" />
                         <SortedAscendingHeaderStyle BackColor="#007DBB" />
                         <SortedDescendingCellStyle BackColor="#CAC9C9" />
                         <SortedDescendingHeaderStyle BackColor="#00547E" />
                     </asp:gridview>
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
